package net.neptech.model.workflow;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.*;
import lombok.*;

import java.util.Date;

/**
 * @Author Saya
 * @Date 2025/8/20 11:48
 * @Description TODO
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "ins_record")
@TableName("ins_record")
public class InstanceRecord {
    @TableField("id")
    @Id
    @TableId

    @GeneratedValue(strategy = GenerationType.UUID)
    private String id;
    /**
     * 流程名字
     */
    @TableField("name")
    private String name;

    /**
     * 发起人的主部门id
     */
    @TableField("main_dept_id")
    private String mainDeptId;

    /**
     * 头像
     */
    @TableField("logo")
    private String logo;

    /**
     * 用户id
     */
    @TableField("user_id")
    private String userId;

    /**
     * 流程id
     */
    @TableField("flow_id")
    private String flowId;

    /**
     * 流程实例id
     */
    @TableField("process_instance_id")
    private String processInstanceId;

    /**
     * 流程实例业务key
     */
    @TableField("process_instance_biz_key")
    private String processInstanceBizKey;

    /**
     * 流程实例业务编码
     */
    @TableField("process_instance_biz_code")
    private String processInstanceBizCode;

    /**
     * 表单数据
     */
    @TableField("form_data")
    private String formData;

    /**
     * 组id
     */
    @TableField("group_id")
    private String groupId;

    /**
     * 组名称
     */
    @TableField("group_name")
    private String groupName;

    /**
     * 状态
     */
    @TableField("status")
    private Integer status;

    /**
     * 结束时间
     */
    @TableField("end_time")
    private Date endTime;

    /**
     * 上级流程实例id
     */
    @TableField("parent_process_instance_id")
    private String parentProcessInstanceId;
    /**
     * 流程节点内容
     */
    @TableField("process")
    private String process;
    /**
     * 结果
     */
    @TableField("result")
    private Integer result;
    /**
     * 主流程节点执行id
     */
    @TableField("parent_process_node_execution_id")
    private String parentProcessNodeExecutionId;
    /**
     * 逻辑删除字段
     */
    @TableField("deleted")
    @Column(name = "deleted")
    private Boolean deleted;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Column(name = "update_time")
    private Date updateTime;
}